<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/public/taglib.jsp"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文章表</title>
<%@ include file="/WEB-INF/page/public/meta.jsp"%>
</head>
<body>
 <style>
     .J_filterGroup .f_main { border: 1px solid #e8e8e8; border-top: 0; }
     .J_filterGroup .f_main .m_list { min-height: 300px; }
     .J_filterGroup .f_toolbar { padding: 10px; background-color: #f4f4f4; border: 1px solid #e8e8e8; }
     .J_filterGroup .f_toolbar .t_text { margin: 0 6px; color: #333; }



 </style>
 <c:set var="cmscategory" value="${cmsCategoryList}"/>
 <div style="margin: 20px;">     
    <blockquote class="layui-elem-quote list_search">
         <%--<shiro:hasPermission name="xinyongka:xinyongka:save">--%>
         <div class="layui-inline">
             <a class="layui-btn layui-btn-normal cmsarticleAdd_btn" id="cmsarticleAdd_btn"><i
                     class="layui-icon">&#xe608;</i> 添加</a>
         </div>
         <%--</shiro:hasPermission>--%>
        <%--<shiro:hasPermission name="sys:admin:delete">--%>
             <div class="layui-inline">
                 <a class="layui-btn layui-btn-danger batchDel"><i
                         class="layui-icon">&#xe640;</i>批量删除</a>
             </div>
         <%--</shiro:hasPermission>--%>

     </blockquote>
     <div class="layui-row">
         <div  style="width:24%;float: left; margin-right: 10px; margin-top: 10px;">
             <input type="hidden" name="type" value="${type }" />
             <input type="hidden" name="articleId" value="${articleId }" />
             <input type="hidden" name="parentId" value="${parentId }" />
                 <div class="J_filterGroup">
                     <div class="f_toolbar">
                         <div class="t_text">栏目列表</div>
                     </div>
                     <div class="f_main">
                         <ul id="demo"></ul>
                     </div>
                 </div>

         </div>
         <div class="layui-col-md9 ">
             <table id="Tablelist" lay-filter="list"></table>

         </div>
     </div>
	<script type="text/html" id="bar">
 	  <%--<a class="layui-btn layui-btn-xs" lay-event="show" >查看</a>--%>
 	  <a class="layui-btn layui-btn-xs" lay-event="edit" >修改</a>
 	  <a class="layui-btn layui-btn-xs" lay-event="del" >删除</a>
	</script> 
</div>	
	 
 <script src="${ctx}/page/cmsarticle/cmsarticle.js?<%=System.currentTimeMillis()%>"></script>

 <script type="text/html" id="creatTpl">
        <div>{{ formatTime(d.createTime,"yyyy-MM-dd")}}</div>
    </script>
    <script type="text/html" id="updateTpl">
        <div>{{ formatTime(d.updateTime,"yyyy-MM-dd")}}</div>
    </script>
    <script type="text/html" id="deleteTpl">
        <div>{{ formatTime(d.deleteTime,"yyyy-MM-dd")}}</div>
    </script>
   <script>
       var cmscategory = ${cmscategory};

    //格式化时间
    function formatTime(datetime, fmt) {
        if (datetime == null || datetime == 0) {
            return "";
        }
        if (parseInt(datetime) == datetime) {
            if (datetime.length == 10) {
                datetime = parseInt(datetime) * 1000;
            } else if (datetime.length == 13) {
                datetime = parseInt(datetime);
            }
        }
        datetime = new Date(datetime);
        var o = {
            "M+" : datetime.getMonth() + 1, //月份
            "d+" : datetime.getDate(), //日
            "h+" : datetime.getHours(), //小时
            "m+" : datetime.getMinutes(), //分
            "s+" : datetime.getSeconds(), //秒
            "q+" : Math.floor((datetime.getMonth() + 3) / 3), //季度
            "S" : datetime.getMilliseconds()
            //毫秒
        };
        if (/(y+)/.test(fmt))
            fmt = fmt.replace(RegExp.$1, (datetime.getFullYear() + "")
                .substr(4 - RegExp.$1.length));
        for ( var k in o)
            if (new RegExp("(" + k + ")").test(fmt))
                fmt = fmt.replace(RegExp.$1,
                    (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k])
                        .substr(("" + o[k]).length)));
        return fmt;
    }
</script>
<script type="text/html" id="hot">
    {{#  if(d.hot == 0){ }}
    不热门
    {{#  } else { }}
    热门
    {{#  } }}
</script>

</body>
</html>

 